package cn.cmeizu.spring6.iocxml.bean;

import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

/**
 * @author cmeizu
 * @date 2023/2/8 22:53
 */
public class TestUserDao {
  public static void main(String[] args) {
    ApplicationContext context = new ClassPathXmlApplicationContext("bean.xml");
    //根据类型获取对应的bean
    UserDao userDao = context.getBean(UserDao.class);
    System.out.println(userDao);
    userDao.run();
  }
}
